import { PolygonNode, PolygonNodeModel } from '@logicflow/core';
class TriangleModel extends PolygonNodeModel {
  setAttributes() {
    this.points = [
      [50, 0],
      [100, 80],
      [0, 80],
    ];
  }

  getNodeStyle(): {
    [x: string]: any;
    fill?: string | undefined;
    stroke?: string | undefined;
    strokeWidth?: number | undefined;
  } {
    const style = super.getNodeStyle();
    style.fill = 'transparent';
    style.stroke = '#fff';
    return style;
  }
}

export default {
  type: 'Triangle',
  view: PolygonNode,
  model: TriangleModel,
};
